<template>
  <div>
    <!-- 面包屑 -->
    <Bread></Bread>
    <!-- 标签页 -->
    <div class="contet_box">
    <el-tabs type="border-card"  v-model="activeName" @tab-click="handleClick">
  <el-tab-pane label="拼团概述" name="first">
    <SpellGroup></SpellGroup>
  </el-tab-pane>
  <el-tab-pane label="商品管理" name="second">
    <GoodsMana ></GoodsMana>
  </el-tab-pane>
  <el-tab-pane label="分类管理" name="third">
    <ClassMana></ClassMana>
  </el-tab-pane>
  <el-tab-pane label="轮播管理" name="fourth">
    <BannerMana></BannerMana>
  </el-tab-pane>
 
</el-tabs>
  </div>
  </div>
</template>

<script>
import Bread from '../Bread/Bread.vue';
import SpellGroup from '../../components/SeckillAbout/SpellGroup.vue';
import GoodsMana from '../../components/SeckillAbout/GoodsMana.vue';
import ClassMana from '../../components/SeckillAbout/ClassMana.vue';
import BannerMana from '../../components/SeckillAbout/BannerMana.vue';
import { timingSafeEqual } from 'crypto';
export default {
    components: { Bread, SpellGroup, GoodsMana, ClassMana, BannerMana,  },
    data() {
      return {
        activeName: 'first',
      }
    },
    methods: {
      handleClick(tab, event) {
        // console.log(tab, event);
      },
      setactiveName(e){
        // console.log('这是传递的参数',e);
        // this.activeName = e
        // console.log(this.activeName);
      }
    },
    mounted() {
      // console.log('这是挂载时候',this.activeName);
      // this.$bus.$on('getNum',this.setactiveName)
    },
    beforeDestroy() {
      
    },
    created() {
     if(this.$route.params.sort){
      this.activeName = this.$route.params.sort
     }
      console.log(this.$route);
    },
}
</script>

<style lang="scss" scoped>
.contet_box{
  width: 1132px;
  height: 1000px;
  margin: 0 auto;
  margin-top: 20px;
}.el-tabs--border-card {
    width: 100%;
    height: 100%;
    background: #FFF;
    border: 1px solid #DCDFE6;
    box-shadow: 0 2px 4px 0 rgb(0 0 0 / 12%), 0 0 6px 0 rgb(0 0 0 / 4%);
}
</style>